-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate the next steps to client side #34450
Migrate the next steps to client side #34450
Conversation
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
…ture/28771-migrate-next-steps-to-client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing well. Thanks for resolving the conflicts!
…ture/28771-migrate-next-steps-to-client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will try to review tomorrow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will try to review tomorrow
…ture/28771-migrate-next-steps-to-client
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rezkiy37 ok couple comments
// Another owner | ||
if (!isOwner) { | ||
optimisticNextStep.title = 'Finished!'; | ||
optimisticNextStep.message = [ | ||
{ | ||
text: 'No further action required!', | ||
}, | ||
]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An approver could also be an admin who still needs to reimburse I think, how would this work in this case? It would show them they are done but they still need to pay it, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An approver could also be an admin...
Yes, could be. I think it is always an admin, it is not?
Based on a message that we get from the backend, it should be "No further action....". So, looks like it works properly.
Approved.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok lets go with this and see if some issues will be reported!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see conflicts but still tested it so that this does not get blocked. It is working good. The chat switching is much snappier now.
@mountiny, please take a look. I've applied the suggestions. |
@allroundexperts was this a comment for wrong PR? 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @rezkiy37 really appreciate it!
@allroundexperts thank you for testing!
// Another owner | ||
if (!isOwner) { | ||
optimisticNextStep.title = 'Finished!'; | ||
optimisticNextStep.message = [ | ||
{ | ||
text: 'No further action required!', | ||
}, | ||
]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok lets go with this and see if some issues will be reported!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.40-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.40-5 🚀
|
Details
Generates an optimistic
nextStep
based on a current report status and other properties. Includes unit-tests that cover 100% of a main function -buildNextStep
.Fixed Issues
$ #28771
PROPOSAL: N/A
Tests
Note: we migrate next step prediction as much as possible. However, the app cannot predict all violations or some other complex states. So, the backend can respond with a little bit detailed next step or even another message like an error or warning. I describe all possible cases that we calculate on the client side in "Tests". Also, since we test how optimistic data works, I recommend to enable slow Internet or offline mode.
Pre requirements:
1. Generates an optimistic
nextStep
once a report has been OPENED1. Self review
2. Scheduled submit enabled
Daily
: "These expenses are scheduled to automatically submit later today! No further action required!";Weekly
: "These expenses are scheduled to automatically submit on Sunday! No further action required!";Twice
a month: "These expenses are scheduled to automatically submit on the 1st and 16th of each month! No further action required!";Monthly
: "These expenses are scheduled to automatically submit on the [Selected report submission date] of each month! No further action required!";Trip
: "These expenses are scheduled to automatically submit at the end of your trip! No further action required!";Manual
: "Waiting for you to submit these expenses.";3. Self submitting prevented
2. Generates an optimistic
nextStep
once a report has been SUBMITTED1. Self review
2. Another reviewer
3. Another owner
3. Generates an optimistic
nextStep
once a report has been APPROVED1. Self review
2. Another owner
4. Generates an optimistic
nextStep
once a report has been PAID1. Paid with wallet
2. Paid outside of Expensify
Offline tests
Same as "Tests".
QA Steps
Same as "Tests".
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android.1.1.mp4
Android.1.2.Last.business.day.mp4
Android.1.3.mp4
Android: mWeb Chrome
Android.Chrome.1.1.mp4
Android.Chrome.1.2.Trip.mov
Android.Chrome.1.3.mp4
iOS: Native
IOS.1.1.mov
IOS.1.2.Last.business.day.mp4
IOS.1.3.mov
iOS: mWeb Safari
IOS.Safari.1.1.mov
IOS.Safari.1.2.Trip.mov
IOS.Safari.1.3.mov
MacOS: Chrome / Safari
Chrome.1.1.mp4
Chrome.1.2.Daily.mp4
Chrome.1.2.Monthly.3rd.mp4
Chrome.1.3.mov
Chrome.2.1.mov
Chrome.2.2.mov
Chrome.2.3.mov
MacOS: Desktop
Desktop.1.1.mp4
Desktop.1.2.Twice.a.month.mov
Desktop.1.3.mov